An efficient and compromise-resilient image encryption scheme for resource-constrained environments

The secret keys produced by current image cryptosystems, which rely on chaotic sequences, exhibit a direct correlation with the size of the image. As the image dimensions expand, the generation of extensive chaotic sequences in the encryption and decryption procedures becomes more computationally intensive. Secondly, a common problem in existing image encryption schemes is the compromise between privacy and efficiency. Some existing lightweight schemes reveal patterns in encrypted images, while others impose heavy computational burdens during encryption/decryption due to the need for large chaotic sequences. In this study, we introduce a lightweight image encryption scheme that involves partitioning the image into uniformly sized tiles and generating a chaotic sequence accordingly. This approach diminishes the necessity to create extensive chaotic sequences equal to the tile size, which is significantly smaller than the original image. As a result, it alleviates the processing burden associated with generating sequences equivalent to the original image size. The results confirm that our proposed scheme is lightweight and secure compared to the latest state-of-the-art image encryption schemes. Additionally, sensitivity analysis demonstrates that the proposed image encryption technique, with a UACI value of 33.48 and NPRC value of 99.96, affirms its resistance to differential attacks.


Introduction
The properties of chaotic maps, such as pseudo-randomness, deterministic, non-linearity, and sensitivity to initial conditions, attracted the research to use in image cryptography.There are two types of chaotic maps: (a) discrete-time iterative map system and (b) continuous time differential equation map system.The discrete-time iterative map system represents the evaluation of the system at discrete intervals of time.These types of maps are usually represented with the iterative equation.Examples of discrete maps are logistic [1] and sine maps [2].The continuous time differential equation map is used to represent the evaluation of the system at a continuous function of time.These types of maps are described using ordinary differential S-Boxes with a size denoted as m for substitution operations.The majority of current image encryption schemes leverage chaotic sequences to execute nearly all the operations mentioned above, enhancing the reliability and security of the scheme [9,10].
Many sensitive applications send image data on the Internet, such as healthcare systems, Internet of Battlefields Things (IoBTs) [11], Internet of Multimedia Things (IoMTs) [12], Industrial Automation [13], Security Surveillance [14], and many more.The privacy of image data is critical in such applications because disclosure of the information may result in financial or territorial loss.There are many applications where the privacy of image data is important, but traditional cryptographic schemes are unsuitable due to the resource-constrained environment.Hence, A novel, lightweight, and secure image encryption scheme is needed.In this research study, we ➢ examine the shortcomings of existing lightweight image encryption approaches.
➢ propose a secure and lightweight image encryption method utilizing a JSMP map, ➢ conduct a comparative evaluation with proposed image encryption schemes using metrics like encryption/decryption times, histogram analysis, correlation analysis, entropy analysis, sensitivity analysis, and time complexity analysis.
➢ conduct diverse analyses, including key space analysis and security assessment, to demonstrate the efficacy of the proposed image encryption technique in thwarting various attacks.
➢ validate the proposed image encryption technique by subjecting it to NIST 800-22 test suit.
The rest of the paper is organized as follows: section 2 discusses the related work on existing image encryption schemes, section 3 contains the proposed image encryption schemes, section 4 compares the proposed image encryption scheme with existing schemes based on performance parameters, and Section 5 concludes the research.

Related work
In this research study, our focus is to propose a lightweight image encryption scheme using chaos cryptography.Many research articles have been published in reputed journals on image encryption using chaos cryptography, such as [15][16][17].The existing image-based encryption techniques can be divided into symmetric chaos-based image encryption schemes [18][19][20][21][22][23], asymmetric chaos-based image encryption schemes [24][25][26][27], and hybrid chaos-based image encryption schemes [28,29].This research focuses on symmetric chaos-based image encryption, subdivided into spatial domain [30] and frequency domain [31][32][33].Spatial domain image encryption schemes directly work on pixels to get the cipher image.In contrast, frequency-domain image encryption schemes transform the plain image into the frequency domain using mathematical transformation before encrypting the image.The spatial domain image encryption techniques are fast and do not distort the decrypted image.Therefore, we have selected four recently published spatial domain image encryption schemes [34][35][36][37], discussed below.
In [37], authors proposed a new robust chaotic map by combining quadratic parabolic and piecewise functions to construct a non-linear system and strong S-box.Subsequently, the authors use the newly proposed map and S-Box to propose a new image encryption scheme.A new proposed hybrid approach generates three chaotic sequences: X, Y, and Z. X is equal to M, Y is equal to N, and Z is equal to M × N, where M and N represent the rows and columns of an original image, respectively.In this proposed technique, the hash value of the original image is transformed into a value used as an initial condition to generate chaotic sequences.As the chaotic sequences are very sensitive to the initial condition, a minor change in the original image generates an entirely different chaotic sequence, X, Y, and Z.The encryption process starts by dividing the plain image P into two sub-images, PA and PB, where PA contains the higher four bits of each pixel of P and PB contains the lower four bits of each pixel of P. The value of PA is shuffled based on X and Y.The shuffled PA is further encrypted by performing the exclusiveor operation on PA, shuffled PA, and Z to get the CA.CB is generated by performing the exclusive-or operation on CA, PB, and Z.Then, the encrypted form of sub-image CA and CB are combined to get the temporary encrypted image C. To achieve confusion and diffusion, each pixel of the temporary encrypted image is shuffled based on S-Box and then added with previously shuffled pixels and Z to get the final encrypted image.The flow of the image encryption scheme is shown in Fig 2.
The key sequences generated in this scheme depend on the original image's size.If the size of the plain image increases, it takes more time to generate the sequences.Moreover, pixel segmentation, scrambling, pixel splicing, confusion, and diffusion processes during encryption make this scheme computationally intensive.
Authors in [35] proposed a lightweight image encryption scheme and 1D quadratic chaotic map to generate key sequences.Two main modules are involved in the proposed scheme: shuffling and substitution.Two sequences, x and y, of size M × 10 3 and N×10 3 are generated for shuffling the image.The x sequence is used to shuffle the rows of the original image, and the y sequence is used to shuffle the columns of the plain image.After shuffling the image, two more sequences, s and v, of size 8 × M × N and M × N are generated for the substitution module.The first step of the substitution module is bit transformation, which uses sequence s.Secondly, the bit transformed image is exclusive-or with v to get the final cipher image.The flow of the proposed scheme is presented in Fig 3 .In the [34] proposed scheme, three chaotic sequences are generated: X1, X2, and X3 of size M+N.The sequence X1 is generated using an Improved Logistic Map (ILM), X2 is generated using the Logistic Mayan System (LOMAS), and X3 is generated using an Improved Sinusoidal Map (ISM)-the key used in this research study in an image.The key and original image are input to the encryption along with the initial conditions for the chaotic systems.The initial condition parameters are generated by taking the hash value of the original image.In the first phase of image encryption, two streams, S1 and S2, are generated by permuting original and key images based on X1 and X2, respectively.The S3 stream is generated by rotating the key image 180 and then permuting it based on X2.Then S4 is generated by taking the exclusive-or of S1, S2, and X2.S4 is permuted based on X3 to get the value of S5, and a 180-degree rotated key image is permuted based on X3 to get the stream S6.Finally, S5 and S6 streams are exclusive-or to get the final encrypted image.The flow of the scheme is shown in Fig 4.
The authors of [36] proposed a new chaotic map-based random number generator module for a keystream generator.The image is transformed as a byte stream.The image stream and keystream are exclusive-or to get the final stream.The final stream is converted into a cipher image.The flow of the scheme is shown in Fig 5.
The proposed technique is lightweight in terms of processing; however, it reveals the pattern in encrypted image, as shown in Fig 6.
The chaotic sequences used in existing schemes are presented in Table 1.The existing image encryption schemes compromise privacy by disclosing the pattern in encrypted images or imposing the processing burden during encryption/decryption by generating large chaotic sequences, as shown in Table 1.In most schemes, the size of a chaotic sequence is equal to the number of pixels of a plain image.Even in some existing schemes, the recommended chaotic sequence size is more than the number of pixels of the plain image.Hence, there is a direct relationship between the size of the chaotic sequence and the number of pixels of the plain image.Such schemes are not suitable for resource-constrained environments, such as IoTs.Hence, resource-constrained computing environments need lightweight, secure image encryption schemes.In this research study, we proposed a novel lightweight and compromise-resilient image encryption scheme.The proposed scheme is compared with existing image encryption based on processing time, entropy, Mean Square Error (MSE), correlation analysis, sensitivity analysis, and Peak signal-to-noise ratio.

The proposed lightweight and compromise resilient image encryption scheme
The flowchart depicting the proposed image encryption scheme is presented in Fig 7 .The proposed technique comprises eight distinct modules, specifically: (a) Image Splitter, (b) Key Generator, (c) Index Generator, (d) Random Number Generator, (e) Tiles Shuffler, (f) Pixels Shuffler, (g) Encryption, and (h) Decryption modules.
Initially, the plain image is segmented into tiles of uniform size with dimensions represented by M t × N t , where M t and N t denote the number of rows and columns in each tile.The tile height and tile width are computed by dividing the image height with M t and image width with N t , respectively.Subsequently, key sequences are generated utilizing the JSMP chaotic map.Mainly, three sequences are employed: X, YC, and YR, using JSMP chaotic map.The size of sequence X matches that of the tiles, M t × N t , and it is used for encrypting the tiles through the exclusive-or operation.The process for generating sequence X is detailed in algorithm 1.Many existing one-dimensional chaotic map generators fail to provide an extensive chaotic regime, resulting in limited key space vulnerability to brute force attacks.In the proposed endfor return key The generated value of x i falls within the range of 0 to 1.This generated x i value is converted into an integer and reduced by applying a modulo operation.Each key-value thus obtained falls within the range of 0 to 255, mirroring the range of image pixels.YC and YR represent index sequences sized at M t and N t , respectively.These sequences are generated to reorganize the pixel values within individual tiles.The process for generating YC and YR is elucidated in Algorithm 2. The index values within these sequences range from 0 to S-1.The purpose of the chaotic sequence is to reorder the index values based on the generated chaotic sequence, thereby introducing a shuffling effect.Algorithm 2 indexGenerator(x 0 , r, S): Creating an index for image shuffling using a JSMP Chaotic Sequence Input: initial value of x 0 , control parameter r, and key size S for i 0 to S-1 if key i > key j , then swap(key i, key j ) The proposed scheme employs three discrete logistic map-based random number generators as logistic maps are suspected of brute force attacks due to their small chaotic regime.Therefore, it generates random numbers only to select a byte from a 256-hash value.Hence, if the attacker finds the key to generating a logistic map, he cannot decrypt the image.Each method produces a distinct sequence of numbers, even when provided with identical initial parameters.These algorithms generate random numbers ranging from 0 to 31, which are utilized to shuffle the produced hash values in the encryption process.Further information about these random number generators is provided in Algorithms 3, 4, and 5.The first random number generator produces a value for 'x' within the range of 0 to 1, which is subsequently converted into an integer and then subjected to modulo operations.This algorithm derives the random value from the integral part while ignoring the fractional component.The value of x is also returned with rand to use as an input for the next call to this function.

Algorithm 4 GenRanNum2(x, r,): Generating Random Numbers through Logistic Chaotic Sequences
Input: initial value of x, control parameter r Output: Random number rand and updated value of Algorithm 4 generates the random value based on the fractional part, and the integral part is ignored.

Algorithm 5 GenRanNum3(x, r,): Generating Random Number using Logistic Chaotic Sequence
Input: initial value of x, control parameter r Output: Random number rand and updated value of Similarly, Algorithm 5 generates the random value based on the fractional and the integral parts.
The image is partitioned into uniform-sized tiles, which are reorganized using the method elucidated in Algorithm 6.This algorithm generates a logistic chaotic map to produce a random sequence of indexes spanning from 0 to D-1, with 'D' representing the total number of tiles in the original image.It's important to note that this algorithm is specifically designed for cases where 'D' is an odd value.

Input: initial value of x, control parameter r, tiles of original image, D is count of tiles
Output: shuffled tiles s_tiles index indexGenerator(x, r, D): The procedure for reversing the tile shuffling is detailed in Algorithm 7.

Algorithm 7 InverseShuffleTiles(stiles, D, x, r): Arrange the tiles of an image in its original form
Input: initial value of x, control parameter r, stiles shuffled tiles of image, D is count of tiles Output: tiles in its original position index = indexGenerator(x, r, D): Specific tile pixels are also subjected to shuffling to introduce confusion and diffusion into the encrypted image.Algorithm 8 illustrates the procedure for shuffling the pixels within a tile, wherein the shuffling is determined by the chaotic sequences YC and YR.The encryption and decryption algorithm generates a hash value using SHA256, resulting in a hexadecimal representation.This hexadecimal value is then converted into an integer array comprising 32 elements, which play a crucial role in the encryption process.The conversion process for the 256-bit hexadecimal hash value is detailed in Algorithm 10.
Algorithm 10 GetHashValue(Image, data): generates the hash value on Image and data and convert it into an integer array of 32 elements contains the value form 0 to 255

Input: Image and data
Output: hkey is hash value of image and data in integer form The encryption algorithm takes the original image as input and transforms it into a cipher image.The process of image encryption is illustrated in Algorithm 11.To initiate the encryption process, the plain image is initially divided into D = V × V tiles, where V is an odd integer.These tiled images are then subjected to shuffling, as explained earlier.Three distinct mechanisms are incorporated to introduce randomness and enhance protection against differential attacks.Before encrypting the first tile, hkey1 is generated by applying SHA256 to the plain image.The resulting SHA256 hexadecimal value is converted into an integer array of 32 elements.
For the first cipher tile, each pixel value in the initial plain tile is exclusive-or with the chaotic sequence X and a randomly selected integer value from hkey1.The pixels in a grayscale image have a single intensity value, whereas pixels in a color image are composed of three values representing the red, green, and blue channels (RGB).When performing operations on a single pixel in a color image, the operations are applied separately to each of the RGB channels.Notably, the encryption process for odd tiles in the plain image differs.A temporary tile is created by performing exclusive-or operations on odd tiles and the previously encrypted tile.These temporary tiles are further shuffled using YC and YR to obtain shuffled temporary tiles.The shuffled temporary tiles are then exclusive-or with the chaotic sequence X and a randomly selected integer value from hkey2.The value of hkey2 is generated by applying SHA256 to the concatenation of the previously encrypted tile and hkey1.Even tiles in the original image are encrypted by performing exclusive-or operations on the even tiles, previously encrypted tiles, chaotic sequence X, and a randomly selected integer value from hkey3.hkey3 is derived by applying SHA256 to concatenate the previously encrypted tile and the chaotic sequence X.
All the encrypted tiles are combined to produce the final single cipher image.
The decryption algorithm accepts a cipher image as its input and transforms it into a plain image.During the conversion process, the decryption algorithm requires the cipher image, hkey1 value, the value of D, and the initial condition (x, r) for the chaotic sequence.The remaining secret values of X, YR, and YC are generated using the method detailed in the encryption algorithm.The encrypted image is partitioned into D = V×V encrypted tiles.The initial encrypted tile undergoes a transformation into a plain tile through an exclusive_or operation involving the first encrypted tile, a generated key sequence X, and hkey1.For the decryption of odd tiles, a temporary tile is formed by exclusively ORing the current odd tile with the previously decrypted tile.Subsequently, an inverse shuffling operation is applied to the temporary tile using chaotic sequences YC and YR to counteract the effects of shuffling during encryption.Following this, the shuffled temporary tile is exclusively ORed with chaotic sequence X and a randomly generated hkey2 to obtain the plain tile.Conversely, even tiles of the encrypted image are transformed into plain tiles by performing an exclusive_or operation on the current encrypted tile, the previously encrypted tile, chaotic sequence X, and a randomly generated hkey3.Finally, all decrypted tiles are reshuffled and combined to reconstruct the original file.The decryption process inverses the encryption process and is explained in Algorithm 12.

Experimental setup
We used Python to implement all the image encryption schemes and evaluated them on the same system having specification Intel(R) Core (TM) i7-10870H CPU @ 2.20 GHz 2.21 GHz with 16GB RAM.We have used 8 RGB images of different sizes from CVG-UGR (https://ccia.ugr.es/cvg/dbimagenes/) and USC-SIPI (https://sipi.usc.edu/database/)image databases.The details of the images used in the experiment are shown in Table 2.
We have used the JSMP map to generate a chaotic sequence because of its large chaotic regime-the value of r2

Encryption/decryption time
This is the time taken by the encryption and decryption process in milliseconds.This time also depends on the system load at the time of evaluation.To overcome this issue, we have taken reading multiple times, and the average result is presented in Figs 9 and 10.The technique presented in [36] takes less time than others in encrypting and decrypting the image.The main reason is that the operations involved in [36] are lightweight.However, this scheme reveals the pattern in the encrypted image.Hence, it's not secure to use.The scheme presented in [37] takes more time than others because of the operations, such as chaotic sequence generation, pixel transformation, shuffling of the pixels, exclusive-or, binary addition, and SBox operation.
The performance of the proposed scheme is better than the existing schemes [34,35,37] because the proposed scheme splits the image into multiple tiles of the same size.The size of the chaotic sequence generated by the proposed scheme is equal to the size of the pixels of a tile.The existing scheme [34,35,37] generates a chaotic sequence equal to the size of pixels in the plain image.The pixel in a tile is much less than the pixels in the original image.This is the main reason our scheme performs better than the existing one.As there are multiple readings  of the proposed scheme with different tile distributions, The optimal performance of the proposed scheme is observed when we divide the image at seven by seven.
The decryption times show the same behaviours exhibited in the encryption process.

Histogram analysis
The analysis of histograms offers valuable insights into the distribution patterns of pixel intensities inside images.A significant image generally exhibits a non-uniform distribution of pixel intensities throughout its entirety, whereas an encrypted image displays a uniform distribution.A good image encryption technique achieves a uniform distribution of pixels throughout the image.Fig 11 depicts the histogram of two images, namely the baboon and car, alongside their respective encrypted counterparts, which have been processed using the proposed image encryption technique.The analysis reveals that the distribution of images exhibits non-uniform characteristics, but the distribution of the encrypted image demonstrates uniform or flat attributes.Therefore, the technique under consideration aims to achieve a uniform distribution of RGB pixels throughout the image.

Correlation analysis
The correlation coefficient quantifies the degree of association between neighbouring pixels in an image.A higher correlation coefficient value indicates a significant association between the adjacent pixels of an image.If the correlation coefficient value is lower for an image, it indicates a weak or non-existent association between the neighbouring pixels of the image.If the image encryption technique fails to disrupt the correlation existing between neighbouring pixels within the encrypted image, an adversary may exploit this vulnerability through the utilization of a correlation attack, thereby obtaining valuable information.The calculation of the correlation coefficient value is determined by employing the subsequent formula: ; and e y ¼ The formulas are utilized to calculate the correlation between consecutive columns of an image.In this context, "p i " denotes the i th pixel column, "p i+1 " denotes the (i+1) th pixel column,  The proposed scheme is also compared with existing image encryption schemes.The obtained results are shown in Table 3.The result shows a minor difference in each scheme's average correlation coefficient value.The value of the correlation coefficient of [35] is better than our proposed scheme, with a minor difference.Alternatively, the correlation coefficient value of the proposed technique is better than [34,36,37].The result also shows that our proposed scheme performs best with the tile size nine by nine.However, the performance of the proposed scheme is also acceptable with the tile size seven by seven.

Entropy analysis
Entropy measures the randomness or uncertainty of an image.A higher entropy value shows more randomness, making it difficult to get the information source.The calculated entropy value of the proposed technique and comparison with existing techniques is presented in Table 4.
The result shows that all the schemes introduce some randomness in encrypted images.The entropy of the proposed scheme with tile seven by seven is almost equal to [37] and is better than [34][35][36].

Mean Square Error (MSE) analysis
Mean Square Error (MSE) measures the difference between plain and encrypted images.The MSE value is calculated using the following formula: Where P represents the plain image, E represents the encrypted image, and M and N are the image dimensions.The cryptosystem is considered strong if the MSE difference is high between the original and encrypted images.The MSE value of the proposed scheme and the existing scheme is presented in Table 5.
The result shows that the MSE value of the proposed technique increases with the tile size.The MSE value of the proposed scheme with tile size nine by nine and greater produces better results than existing schemes.

Sensitivity analysis
The secure image encryption schemes must support the avalanche effect.The cipher should be changed completely if there is a minor change in the plain image.The sensitivity analysis evaluates the Number of Changing Pixel Rate (NPRC) and Unified Averaged Changed Intensity (UACI).The ideal values of NPRC are greater than 99, and UACI is greater than 33 for a secure image encryption scheme.NPRC and UACI values are computed using the following formulas: To evaluate the value of UACI, two identical images having only a one-pixel difference are encrypted, and the cipher images are represented with C1 and C2.While testing this scheme in our experimental setup, the key's value remains the same for both encrypted images with a one-pixel difference.The obtained results are presented in Tables 6 and 7.
It is observed from the result that the proposed scheme is secure against differential attack as the value of both parameters is in the acceptable range in most of the cases.The result of the schemes presented in [35,36] is nearly equal to zero, and the result of [34] is also not in an acceptable range.The only existing scheme that protects against differential attack is [37].The performance of our proposed technique is better than [37], with a tile size seven by seven.

NIST 800-22 test suits
We have tested our proposed image encryption scheme using NIST 800-22 test suits to validate the randomness in the encrypted image of a baboon of size 512 by 512.For each NIST 800-22 test, a P-value exceeding 0.01 is required for successful passage.The outcomes presented in Table 8 affirm that the encrypted image successfully passed all the randomness tests outlined in NIST 800-22.

Contrast analysis
This analysis provides information on the difference in intensity of the darkest and brightest parts of an image.A greater contrast value indicates a more significant difference, while a lower value signifies a more even distribution of tones.When the image encryption algorithm relies on pixel values or frequency components, a cryptic image with an elevated contrast value becomes challenging for an attacker to decipher.Table 9 presents the contrast value of the original image and encrypted image using the proposed image technique.The results confirm that the proposed image encryption substantially enhances the contrast level in the encrypted image.

Key space analysis
The encryption and decryption process involves three types of secret keys.The first key, with a size of 256 bits, represents the hash value of the original image.The second key comprises the initial parameters of the logistic map, essential for generating random numbers.Lastly, the third key consists of the initial parameters of the JSMP map, used to generate key sequences (X, Y, and Z) to impart confusion and diffusion properties to the encrypted image.The chaotic range of the logistic map spans from 3.57 to 4.0, defined by two initial parameters: x 0 and r.The value of x 0 falls within the range of 0 to 1, while the parameter r ranges from 3.57 to 4.0.Notably, x 0 for the logistic map has 15 varied digits in its decimal fraction, and the parameter r has 16 decimal fraction digits.Similarly, the chaotic range of the JSMP map extends from Therefore, the analysis above validates the security of the suggested image encryption technique against brute-force attacks.To enhance the key space, an option is to incorporate a hash function that generates a hash on the original image exceeding 256 bits, such as SHA-512, SHA-3, and so forth.Within our proposed image encryption scheme, we opted for SHA-256 from the SHA family due to its security features and lower processing requirements compared to other SHA members.It's worth noting that in the future, should heightened security be necessary, there is flexibility to substitute SHA-256 with other members of the SHA family.

Security analysis
The proposed image encryption scheme undergoes evaluation through known plaintext attacks, known ciphertext-only attacks, chosen plaintext attacks, and chosen ciphertext attacks.In a known ciphertext-only attack, the attacker possesses one or more ciphertexts exclusively.To decipher this ciphertext, the attacker must possess knowledge of the original image to generate the initial secret key and two additional keys, serving as initial parameters for chaotic sequence generation.Since the encrypted image does not disclose any key-related information, executing a known ciphertext-only attack to unveil key secrets is infeasible.The ciphertext-only attack provides no insights into either the keys or the original image.Conversely, in a known plaintext attack, the attacker possesses information about both the encrypted image and its corresponding cipher image, aiming to extract key details.Here, the attacker has access to the original image, enabling the derivation of the initial 256-bit key through hashing the original image.However, obtaining the remaining two keys, associated with the logistic map and JSMP map's initial parameters remains elusive even after acquiring knowledge of the first key.Consequently, the proposed system exhibits security against known plaintext attacks.In a chosen plaintext attack, the attacker possesses the capability to utilize the encryption oracle.Through this ability, the attacker encrypts chosen messages, analyzing the resulting ciphertext patterns to get secret information.However, even in this scenario, obtaining details about the encryption keys or the encrypted image proves elusive.This is because the initial key used in the image encryption process is derived from the hash value of the original image itself.Consequently, despite ciphertext observation, the attacker remains unable to extract any meaningful information.Similarly, in a chosen ciphertext attack, the attacker can employ the decryption oracle to decrypt messages of their choosing.Nevertheless, this capability does not facilitate the acquisition of secret information for the same reason outlined previously.Consequently, the proposed encryption technique provides protection against various attack scenarios, including known plaintext attacks, known ciphertext-only attacks, chosen plaintext attacks, and chosen ciphertext attacks.

Time complexity
The key operations within the proposed image encryption method encompass image splitting, tile shuffling, key generation, encryption, decryption, inverse splitting, and tile combination.

Conclusion
Image data is among the most important data being shared on the Internet.Many sensitive applications, such as Healthcare, Internet of Battlefield Things (IoBTs), Satellite, Surveillance applications, and many more, send image data over the Internet.The image data of such applications must be secured to avoid any physical or financial loss.The resource limitation of a few of the applications described above restricts the usage of traditional techniques for image encryption.Hence, there is a need for a lightweight and secure image encryption scheme.The object of this research study is to propose a lightweight and secure image encryption technique for resource-constrained environments.The result shows that the proposed image encryption scheme with the seven-by-seven tiles gives optimal results compared to the existing lightweight image encryption schemes.Moreover, the security analysis also indicates that the proposed scheme is secure against differential attacks.The brute force attack is also impossible because of the long chaotic regime of the JSMP map and the 256-bit key used as the encryption key.The proposed image encryption scheme functions seamlessly with images that can be perfectly divided into equal-sized tiles.In cases where an image possesses dimensions that do not permit division into tiles of equal size, the algorithm refrains from encrypting less than 0.5% of the final rows and columns.Nonetheless, this impact remains imperceptible to the human eye.Our objective is to rectify and eliminate this limitation in future iterations.

]Algorithm 3 Fig 7 .
Fig 7. Encryption process for the proposed image encryption scheme.https://doi.org/10.1371/journal.pone.0297534.g007 [0.502,2000].The initial condition used for the chaotic map is x o = 0.4544 and r = 3.91122.The schemes are evaluated based on encryption/decryption time, entropy, Mean Square Error (MSE), correlation analysis, sensitivity analysis, and Peak Signal to noise ratio.The encryption results of various test images with tile sizes seven by seven are shown inFig 8.

Fig 8 .
Fig 8.The plain images and their encrypted images using the proposed technique with tile size seven by seven.https://doi.org/10.1371/journal.pone.0297534.g008

Fig 11 .
Fig 11.Analysis of histograms for two plaintext images encrypted using a proposed image encryption technique: (a) Original baboon image, (b) Histogram of the original baboon image, (c) Encrypted baboon image, (d) Histogram of the encrypted baboon image, (e) Original car image, (f) Histogram of the original car image, (g) Encrypted car image, and (h) Histogram of the encrypted car image.https://doi.org/10.1371/journal.pone.0297534.g011

Fig 12 .
Fig 12.The relationship between adjacent rows and adjacent columns of plain image and encrypted image (a) plain image of baboon, (b) relationship between two adjacent columns of plain image baboon, (c) relationship between two adjacent rows of plain image baboon (d) encrypted image of baboon, (e) relationship between two adjacent columns of encrypted image baboon, (f) relationship between two adjacent rows of encrypted image baboon, (g) plain image of car, (h) relationship between two adjacent columns of plain image car, (i) relationship between two adjacent rows of plain image car (j) encrypted image of car, (k) relationship between two adjacent columns of encrypted image car, (l) relationship between two adjacent rows of encrypted image car.https://doi.org/10.1371/journal.pone.0297534.g012 The time complexity associated with both the image splitting and tile combination processes is O(T), where T signifies the total number of tiles.Likewise, the shuffle and reshuffle operations exhibit a time complexity of O(T).The encryption and decryption algorithms contribute a time complexity of O(D × D × T), where D denotes the number of rows or columns in a tile, and T represents the total number of tiles.The time complexity of the key generation module is O(D × D).Consequently, the comprehensive complexity of the proposed image encryption method is expressed as O(D × D × T).

Algorithm 8
ShuffleTilePixels(tile, YC,YR, R t , C t ): Shuffle the pixels of a tile Input: tile of an image is represented with tile, YC and YR are generated using IndexGenerator () for shuffling of pixels inside tiles, and R t and C t represents the rows and cols of tile respectively Output: shuffled tiles s_tilefor i 0 to R t -1 for j 0 to C t -1 s_tile i,j tile YR[i],YC[j]endfor endfor return s_tileThe inverse process of pixel shuffling is shown in Algorithm 9. Algorithm 9 InverseShuffleTilePixels(s_tile, YC,YR, R t , C t ): Arrange the pixels of a tile in its original form Input: shuffled tile of an image is represented with s_tile, YC and YR are generated using IndexGenerator() for shuffling of pixels inside tiles, and R t and C t represents the rows and cols of tile respectively Output: tile in its original form tile for i 0 to R t -1 for j 0 to C t -1 tile YR[i],YC[j] s_tile i,j endfor endfor return tile img is the original image, D is the total tiles, R t is the rows of tile, C\ t is the columns of tile, and (x, r) are the initial parameters of chaotic map Algorithm 11 EncryptImage(img, D, R t , C t , x, r): This algorithm converts the original image into cipher image Input: DecryptImage(c_img, hkey1, D, R t , C t , x, r): This algorithm coverts the cipher image into original image Input: c_img is the cipher image, hkey1 is the hash value of original, D is the total tiles, R t is the total rows of tile, C t is the total columns of tile, and (x, r) are the initial parameters of chaotic map

Table 6 . UACI analysis.
, governed by two initial parameters: x 0 and r.The x 0 parameter of the JSMP map consists of 15 varied digits in its decimal fraction, while the r parameter comprises 17 decimal fraction digits.Consequently, the total key space required for a brute-force attack can be determined using the following equation: Key Space ¼ 2000 � 10 15 � 10 17 � 10 15 � 10 16 � 2 256

Table 8 . The validation of the proposed encryption scheme based on NIST 800-22 test suits.
Table 10 illustrates a comparison of time complexities between the proposed image encryption technique and existing image encryption techniques.The analysis affirms that the time complexity of the proposed image encryption outperforms that of the existing image encryption schemes.